SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 59265: SCHEMA= is not honored with the SORT procedure when running against Netezza

DetailsAboutRate It

When you run the SORT procedure against a Netezza table, the schema specified with the SCHEMA= LIBNAME option might be ignored. This behavior might result in errors referencing the table in the ADMIN schema rather than the one you specified, or it might cause incorrect results.

Example 1

In the following example, the expected results are that the sort of the Netezza table TEST.MYSCHEMA.TESTSORT is written to a new Netezza table TEST.MYSCHEMA.TESTSORTOUT.

libname nz netezza server=server-name user=user-ID pwd=password database=database-name schema=MY-SCHEMA; proc sort data=nz.testsort out=nz.testsortout nodupkey; by a; run;

The following error occurs when the SAS generated query does not include the schema and the table TESTSORT does not exist in the ADMIN schema:

ERROR: CLI execute error: ERROR: relation does not exist TEST.ADMIN.TESTSORTOUT ERROR: Error during in-database processing. ERROR: SQL generation encountered a critical failure and cannot revert to standard processing. To avoid this failure, set the SQLGENERATION option to NONE.

The error "CLI execute error: ERROR: Relation 'TEST.ADMIN.TESTSORTOUT' does not have attribute 'varname'" might occur if the following conditions are true:

  • The Netezza table TESTSORT is in both the ADMIN schema and the MY-SCHEMA schema.
  • The Netezza table TESTSORTOUT is present in only the ADMIN schema.
  • TESTSORTOUT has a different set of variables from TESTSORT.

Example 2

In the following example, the expected results are that the sort of the Netezza table TEST.MYSCHEMA.TESTSORT is written to the SAS data set WORK.TESTSORTOUT.

libname nz netezza server=server-name user=user-ID pwd=password database=database-name schema=MY-SCHEMA; proc sort data=nz.testsort out=work.testsortout nodupkey; by a; run;

However, when the Netezza table TESTSORT is in both the ADMIN schema and the MY-SCHEMA schema, but the data in the two tables is different, the output from the sort might be from the ADMIN.TESTSORT.

Workaround

To work around the above behaviors, set the system option SQLGENERATION to NONE as shown below:

options sqlgeneration=none;


Operating System and Release Information

Product FamilyProductSystemProduct ReleaseSAS Release
ReportedFixed*ReportedFixed*
SAS SystemSAS/ACCESS Interface to NetezzaMicrosoft® Windows® for x649.4_M39.4_M39.4 TS1M39.4 TS1M5
Microsoft Windows 8 Enterprise 32-bit9.4_M39.4_M39.4 TS1M39.4 TS1M5
Microsoft Windows 8 Enterprise x649.4_M39.4_M39.4 TS1M39.4 TS1M5
Microsoft Windows 8 Pro 32-bit9.4_M39.4_M39.4 TS1M39.4 TS1M5
Microsoft Windows 8 Pro x649.4_M39.4_M39.4 TS1M39.4 TS1M5
Microsoft Windows 8.1 Enterprise 32-bit9.4_M39.4_M39.4 TS1M39.4 TS1M5
Microsoft Windows 8.1 Enterprise x649.4_M39.4_M39.4 TS1M39.4 TS1M5
Microsoft Windows 8.1 Pro 32-bit9.4_M39.4_M39.4 TS1M39.4 TS1M5
Microsoft Windows 8.1 Pro x649.4_M39.4_M39.4 TS1M39.4 TS1M5
Microsoft Windows 109.4_M39.4_M39.4 TS1M39.4 TS1M5
Microsoft Windows Server 20089.4_M39.4 TS1M3
Microsoft Windows Server 2008 R29.4_M39.4 TS1M3
Microsoft Windows Server 2008 for x649.4_M39.4 TS1M3
Microsoft Windows Server 2012 Datacenter9.4_M39.4_M39.4 TS1M39.4 TS1M5
Microsoft Windows Server 2012 R2 Datacenter9.4_M39.4_M39.4 TS1M39.4 TS1M5
Microsoft Windows Server 2012 R2 Std9.4_M39.4_M39.4 TS1M39.4 TS1M5
Microsoft Windows Server 2012 Std9.4_M39.4_M39.4 TS1M39.4 TS1M5
Windows 7 Enterprise 32 bit9.4_M39.4_M39.4 TS1M39.4 TS1M5
Windows 7 Enterprise x649.4_M39.4_M39.4 TS1M39.4 TS1M5
Windows 7 Home Premium 32 bit9.4_M39.4_M39.4 TS1M39.4 TS1M5
Windows 7 Home Premium x649.4_M39.4_M39.4 TS1M39.4 TS1M5
Windows 7 Professional 32 bit9.4_M39.4_M39.4 TS1M39.4 TS1M5
Windows 7 Professional x649.4_M39.4_M39.4 TS1M39.4 TS1M5
Windows 7 Ultimate 32 bit9.4_M39.4_M39.4 TS1M39.4 TS1M5
Windows 7 Ultimate x649.4_M39.4_M39.4 TS1M39.4 TS1M5
64-bit Enabled AIX9.4_M39.4_M39.4 TS1M39.4 TS1M5
64-bit Enabled Solaris9.4_M39.4_M39.4 TS1M39.4 TS1M5
HP-UX IPF9.4_M39.4_M39.4 TS1M39.4 TS1M5
Linux for x649.4_M39.4_M39.4 TS1M39.4 TS1M5
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.